package com.xxkj.drugtraceability.net


import com.xxkj.drugtraceability.bean.RouterData
import com.xxkj.drugtraceability.bean.*
import okhttp3.ResponseBody
import retrofit2.Call
import retrofit2.http.*


interface WanService {

    companion object {
//                const val BASE_URL_API = "http://192.192.195.27:10012"//鹤壁市妇幼保健院
//        const val BASE_URL_API = "http://192.168.167.167:10012"//郑大二
//        const val BASE_URL_API = "http://39.165.129.94:10012"//济源中医院
//        const val BASE_URL_API = "http://39.165.129.94:10013"//济源中医院新

//                const val BASE_URL_API = "http://1.192.92.148:9098"//南乐县人民医院
//        const val BASE_URL_API = "http://www.91xxkj.com:10012"//公司环境
//        const val BASE_URL_API = "http://192.168.66.204:8099"//黄河中心医院
//        const val BASE_URL_API = "http://192.168.0.29:8099"//新野县中医院
//        const val BASE_URL_API = "http://117.158.127.180:1006"//舞钢市人民医院
//        const val BASE_URL_API = "http://192.168.99.102:9099"//济源市第二人民医院
//        const val BASE_URL_API = "http://125.40.237.120:9053"//济源市第二人民医院
//        const val BASE_URL_API = "http://117.158.127.180:10012"//舞钢人民医院
//      const val BASE_URL_API = "http://www.91xxkj.com:10012"//公司环境
//        const val BASE_URL_API = "http://www.91xxkj.com:9053"//公司环境
//                    const val BASE_URL_API = "http://cloud.91xxkj.com:9053"//公司环境
                    const val BASE_URL_API = "http://ypzs.91xxkj.com:9033"//公司环境
//                    const val BASE_URL_API = "http://172.20.1.108:10012"//安阳六院
//        const val BASE_URL_API = "https://hht.xxrmyy.net:10012"
         var BASE_URL = BASE_URL_API

    }

    /**
     * 获取验证码
     */
    @GET("/api/pda/captchaImage")
    suspend fun getImageCode():WanResponse<ImageCodeBean>
    /**
     * 登录
     */
    @Headers("Content-Type: application/json")
    @POST("/login/pda")
    suspend fun login(@Body loginRequest: String):WanResponse<BaseData<LoginBean>>

    /**
     * 获取登录人信息
     */
    @GET("/api/pda/getInfo")
    suspend fun getUserInfo():WanResponse<BaseData<UserBean>>
    @GET("/api/pda/getRouters")
    suspend fun getRouters():WanResponse<RouterData>
    @GET("/api/pda/in/storage/queryDrugInStorageInfo")
    suspend fun queryDrugInStorageInfo(@Query("inStorageNo") inStorageNo:String):WanResponse<BaseData<List<DrugInStorageBean>>>
    @Headers("Content-Type: application/json")
    @POST("/api/pda/drugOutDepot/info/getDrugOutDepotList")
    suspend fun getDrugOutDepotList(@Body data:String):WanResponse<BaseData<List<DrugOutStorageBean>>>

    @Headers("Content-Type: application/json")
    @POST("/api/pda/DrugEquipment/checkEquipment")
    suspend fun checkEquipment(@Body pdaEquipmentApiDto: String):WanResponse<Any>
    @Headers("Content-Type: application/json")
    @POST("/api/pda/prescriptionInfo/queryPrescriptionInfoList")
    suspend fun queryPrescriptionInfoList(@Body prescriptioninfo: String):WanResponse<BaseData<List<PrescriptionInfoBean>>>
    @Headers("Content-Type: application/json")
    @POST("/api/pda/drugTrac/info/trugTracCodgIsGather")
    suspend fun trugTracCodgIsGather(@Body prescriptioninfo: String):WanResponse<BaseData<DrugDictDataList>>
    @Headers("Content-Type: application/json")
    @POST("/api/pda/drugTrac/info/bakeTrugTracCodgIsGather")
    suspend fun bakeTrugTracCodgIsGather(@Body prescriptioninfo: String):WanResponse<BaseData<DrugDictDataList>>

    @Headers("Content-Type: application/json")
    @POST("/api/pda/prescriptionInfo/finishScanDrugCode")
    suspend fun finishScanDrugCode(@Body prescriptioninfo: String): WanResponse<Any>

    @Headers("Content-Type: application/json")
    @POST("/api/pda/prescriptionInfo/refund/finishScanBackDrugCode")
    suspend fun finishScanBackDrugCode(@Body prescriptioninfo: String): WanResponse<Any>

    @Headers("Content-Type: application/json")
    @POST("/api/pda/prescriptionInfo/refund/getPreRefundList")
    suspend fun getPreRefundList(@Body prescriptioninfo: String): WanResponse<BaseData<List<PatientDrugData>>>
    @Headers("Content-Type: application/json")
    @POST("/api/pda/prescriptionInfo/refund/getPreDrugRefundList")
    suspend fun getPreDrugRefundList(@Body prescriptioninfo: String): WanResponse<BaseData<List<PrescriptionInfoBean>>>
    //获取科室列表
    @GET("/api/pda/prescriptionInfo/queryAllDept")
    suspend fun queryAllDept():WanResponse<BaseData<MutableList<DepartBean>>>
    //获取病人列表
    @Headers("Content-Type: application/json")
    @POST("/api/pda/prescriptionInfo/queryPatientList")
    suspend fun queryPatientList(@Body prescriptioninfo: String):WanResponse<BaseData<PatientData>>

    /**
     * 获取病人的某个时间点的医嘱列表
     */
    @Headers("Content-Type: application/json")
    @POST("/api/pda/prescriptionInfo/getDoctorOrderedInfoList")
    suspend fun getDoctorOrderedInfoList(@Body prescriptioninfo: String):WanResponse<BaseData<List<DoctorAdviceInfoBean>>>
    //根据溯源码获取医嘱和药的信息
    @Headers("Content-Type: application/json")
    @POST("/api/pda/prescriptionInfo/refund/getSendBackList")
    suspend fun getSendBackList(@Body prescriptioninfo: String):WanResponse<BaseData<List<DoctorAdviceInfoBean>>>
    //药品入库追溯码信息保存-加token
    @Headers("Content-Type: application/json")
    @POST("/api/pda/collected/inandout/drugInStorage")
    suspend fun drugInStorage(@Body prescriptioninfo: String):WanResponse<Any>
//药品出库追溯码信息保存-加token
    @Headers("Content-Type: application/json")
    @POST("/api/pda/collected/inandout/finishDrugOutDepot")
    suspend fun finishDrugOutDepot(@Body prescriptioninfo: String):WanResponse<Any>
    @Headers("Content-Type: application/json")
    @POST("/api/pda/collected/inandout/queryInStorageInfo")
    suspend fun queryInStorageInfo(@Body prescriptioninfo: String):WanResponse<BaseData<OneData>>
  @Headers("Content-Type: application/json")
    @GET("/api/pda/collected/tracCode/list")
    suspend fun tracCodeList(@Query("collectEndTime") collectEndTime:String
                             ,@Query("collectStartTime") collectStartTime:String
                             ,@Query("dataType") dataType:String
                             ,@Query("patientId") patientId:String
                             ,@Query("pdaSearchKeyWord") pdaSearchKeyWord:String
                             ,@Query("psnName") psnName:String
                             ,@Query("tradeType") tradeType:String
                             ,@Query("visitNo") visitNo:String
  ):WanResponse<TwoData>
    @Headers("Content-Type: application/json")
    @POST("/api/pda/collected/inandout/getDrugOutDepotList")
    suspend fun getHasDrugOutDepotList(@Body data:String):WanResponse<BaseData<OneOutData>>
    @GET("/api/pda/collected/tracCode/detail")
    suspend fun tracCodedetail(@Query("id") id:String?
                               ,@Query("tradeType") tradeType:String):WanResponse<BaseData<List<DrugInfoBean>>>
    @Headers("Content-Type: application/json")
    @POST("/api/pda/collected/tracCode/tracCodeModify")
    suspend fun tracCodeModify(@Body prescriptioninfo: String):WanResponse<Any>
    @Headers("Content-Type: application/json")
    @POST("/api/pda/collected/tracCode/tracCodeUpload")
    suspend fun tracCodeUpload(@Body prescriptioninfo: String):WanResponse<Any>
  @Headers("Content-Type: application/json")
    @POST("/api/drugPdaClientVersion/checkVersion")
    suspend fun checkVersion(@Body prescriptioninfo: String):WanResponse<BaseData<UpdateData>>
    @Headers("Content-Type: application/json")
    @GET("/api/pda/system/config/configKey/{configKey}")
    suspend fun configKey(@Path("configKey")configKey:String):WanResponse<BaseData<ConfigBean>>
    //病区领药追溯--查询药品信息
    @Headers("Content-Type: application/json")
    @POST("/api/pda/medicationReceiptInfo/getDrugInfoList")
    suspend fun getDrugInfoList(@Body data:String):WanResponse<BaseData<DepartDrug>>
    @Headers("Content-Type: application/json")
    @POST("/api/pda/medicationReceiptInfo/saveDrugTracInfo")
    suspend fun saveDrugTracInfo(@Body data: String):WanResponse<Any>
    @Headers("Content-Type: application/json")
    @POST("/api/pda/medicationReceiptInfo/checkIsSync")
    suspend fun checkIsSync(@Body prescriptioninfo: String):WanResponse<BaseData<DrugDictDataList>>
    @Headers("Content-Type: application/json")
    @POST("/api/pda/medicationReceiptInfo/getCheckDrugInfoList")
    suspend fun getCheckDrugInfoList(@Body data:String):WanResponse<BaseData<DepartDrug>>
    @Headers("Content-Type: application/json")
    @POST("/api/pda/medicationReceiptInfo/checkDrugInfo")
    suspend fun checkDrugInfo(@Body data: String):WanResponse<BaseData<SucResult>>
    @Headers("Content-Type: application/json")
    @POST("/api/msfx/queryTracCodeByBoxCode")
    suspend fun queryTracCodeByBoxCode(@Body data: String):WanResponse<BaseData<List<String>>>
    @Headers("Content-Type: application/json")
    @POST("/api/msfx/isOpenMsfx")
    suspend fun isOpenMsfx():WanResponse<BaseData<Boolean>>
}